package ph.com.gs3.formalistics.model.tables;

public class PendingActionsTable extends AbstractDataTable {

	public static final String NAME = "PendingActions";

	public static final String COL_ID = "_id";
	public static final String COL_ACTION_NAME = "action_name";
	public static final String COL_ACTION_DATA = "action_data";
	public static final String COL_DESTINATION_SERVER = "destination_server";
	public static final String COL_ISSUED_BY_USER_ID = "issued_by_user_id";
	public static final String COL_RELATED_DATA_DB_ID = "related_data_db_id";
	public static final String COL_RELATED_DATA_DESC = "related_data_desc";
	public static final String COL_DATE_ISSUED = "date_issued";

	@Override
	public String[] getTableColumns() {
		return new String[] { COL_ID, COL_ACTION_NAME, COL_ACTION_DATA, COL_DESTINATION_SERVER,
		        COL_ISSUED_BY_USER_ID, COL_RELATED_DATA_DB_ID, COL_RELATED_DATA_DESC,
		        COL_DATE_ISSUED };
	}

	@Override
	protected String getCreateTableQuery() {
		// @formatter:off
		return 	"CREATE TABLE " + NAME 		+ "("
				+ COL_ID 					+ " INTEGER PRIMARY KEY AUTOINCREMENT, "
				+ COL_ACTION_NAME 			+ " TEXT NOT NULL, "
				+ COL_ACTION_DATA 			+ " TEXT NOT NULL, "
				+ COL_DESTINATION_SERVER 	+ " TEXT NOT NULL, "
				+ COL_ISSUED_BY_USER_ID 	+ " TEXT NOT NULL, "
				+ COL_RELATED_DATA_DB_ID 	+ " TEXT NOT NULL, "
				+ COL_RELATED_DATA_DESC 	+ " TEXT NOT NULL, "
				+ COL_DATE_ISSUED 			+ " TEXT NOT NULL"
			+ "); ";
		// @formatter:on
	}

	@Override
	protected String getTableName() {
		return NAME;
	}

}
